package com.qfedu.edu.seckill.po;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaobobo
 * @since 2024-11-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_order")
@ApiModel(value="Order对象", description="")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单id")
    @TableId(value = "order_id", type = IdType.ID_WORKER_STR)
    private String orderId;

    @ApiModelProperty(value = "总金额，单位为分")
    private Long totalFee;

    @ApiModelProperty(value = "实付金额。单位:分。如:20007，表示:200元7分")
    private Long actualFee;

    @ApiModelProperty(value = "优惠活动id，多个以，隔开")
    private String promotionIds;

    @ApiModelProperty(value = "支付类型，1、在线支付，2、货到付款")
    private Integer paymentType;

    @ApiModelProperty(value = "邮费。单位:分。如:20007，表示:200元7分")
    private Long postFee;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "发票类型(0无发票1普通发票，2电子发票，3增值税发票)")
    private Integer invoiceType;

    @ApiModelProperty(value = "订单来源：1:app端，2：pc端，3：微信端")
    private Integer sourceType;

    @ApiModelProperty(value = "0：未支付  1：支付成功   2：支付失败")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "发货时间")
    private Date consignTime;

    @ApiModelProperty(value = "交易完成时间")
    private Date endTime;

    @ApiModelProperty(value = "交易关闭时间")
    private Date closeTime;

    @ApiModelProperty(value = "评价时间")
    private Date commentTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "离线乐观锁")
    @Version
    private Integer version;

    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "订单号")
    private String orderNum;


}
